package com.hyxt.utils;

import com.hyxt.DTO.PlatChannels;

import java.util.concurrent.ConcurrentHashMap;

/**
 * @author songm
 * @version v1.0
 * @Description 用于存储链路通道名的缓存
 * @Date: Create in 21:47 2017/12/19
 * @Modifide By:
 **/
public class LinksCache{

    //存PlatChannels的map，key为mainChannel、slaveChannel或transferChannel
    //可以通过三者任一找到该平台的三条链路
    public static ConcurrentHashMap<String,PlatChannels> links = new ConcurrentHashMap<>();

    public static PlatChannels get(String key){
        return links.get(key);
    }

    public static PlatChannels put(String key, PlatChannels value){
        return links.put(key, value);
    }

    public static PlatChannels remove(String key){
        return links.remove(key);
    }
}
